<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .col-label {
                width: 100px;
                text-align: right;
            }

            .col-input {
                width: 30px;
            }
        </style>
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                }
            }
        </script>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <h:form id="query">
                <p:growl id="msgs" showDetail="false"/>
                <p:panel header="服务器系统状态详情">
                    <br/>
                    <p:fieldset legend="服务器系统预警信息" toggleable="true">
                        <h:panelGrid columns="2" cellpadding="30">
                            <p:graphicImage value="/images/dep/warn1.jpg" style="width:70px;height:70px;"/>
                            <h:panelGrid columns="1" style="font-size: 13px;">
                                <p:dataList value="#{sysStatusWarnAction.warningList}"
                                            var="warning" itemType="disc">
                                    #{warning}
                                </p:dataList>
                            </h:panelGrid>
                        </h:panelGrid>
                    </p:fieldset>
                    <br/>
                    <p:fieldset legend="服务器系统状态" toggleable="true">
                        <br/>
                        <p:dataGrid var="elmt" value="#{sysStatusWarnAction.elmtBeans}" columns="3"
                                    rows="3" paginator="true" effect="true" paginatorPosition="bottom">
                            <p:column>
                                <p:fieldset legend="#{elmt.elmtName}" style="text-align:center">
                                    <h:panelGrid columns="1" style="width:100%;text-align: center;">
                                        <p:graphicImage style="width:50px;height:50px"
                                                        value="/images/dep/#{elmt.picName}"/>

                                        <h:outputText value="总容量：#{elmt.totalSize}"/>
                                        <h:outputText value="可用量：#{elmt.freeSize}"/>
                                        <h:outputText value="#{elmt.usedPart}">
                                            <f:convertNumber pattern="利用率：###.##%"/>
                                        </h:outputText>
                                        <h:outputText value="是否警告：#{elmt.warn.title}"/>
                                    </h:panelGrid>
                                </p:fieldset>

                            </p:column>

                        </p:dataGrid>

                    </p:fieldset>
                </p:panel>
            </h:form>

        </div>
    </ui:define>

</ui:composition>